package com.wnhz.work.yz.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.wnhz.work.yz.BaseActivity;
import com.wnhz.work.yz.R;
import com.wnhz.work.yz.bean.BaoBean;

public class BaoXQActivity extends BaseActivity implements View.OnClickListener {
    private BaoBean bean = new BaoBean();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_bao_xq);
        bean = (BaoBean) getIntent().getSerializableExtra("bean");
        TextView title = (TextView) findViewById(R.id.view_main_middle_title);
        title.setText("已报检");
        findViewById(R.id.btn_main_left).setOnClickListener(this);
//
        TextView hao = (TextView) findViewById(R.id.hao);
        hao.setText("合同编号：" + bean.getInfo().getBudget_no());
        ImageLoader.getInstance().displayImage(bean.getInfo().getImg(), (ImageView) findViewById(R.id.img));

        TextView sname = (TextView) findViewById(R.id.sname);
        sname.setText(bean.getInfo().getProject_name());
        TextView install = (TextView) findViewById(R.id.install);
        install.setText("安装队：" + bean.getInfo().getInstall());
        TextView ss = (TextView) findViewById(R.id.ss);
        ss.setText(bean.getInfo().getLabel());
        TextView info = (TextView) findViewById(R.id.info);
        info.setText(bean.getInfo().getAddress());
        TextView has = (TextView) findViewById(R.id.has);
        has.setText("总套数：" + bean.getInfo().getAll_nums() + "套/已报检套数：" + bean.getInfo().getHas_nums() + "套");
        TextView jingli = (TextView) findViewById(R.id.jingli);
        jingli.setText(bean.getInfo().getManager());
        TextView sj = (TextView) findViewById(R.id.sj);
        sj.setText(bean.getInfo().getCheck_time());
        TextView tel = (TextView) findViewById(R.id.tel);
        tel.setText(bean.getInfo().getTel());

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_main_left:
                finish();
                break;
        }
    }
}
